package com.foreveross.project.projectonline.jfinal.plugin;

public class JedisSentinelQueueProducer {
	String queueName;

	private JedisSentinelQueueProducer(String queueName) {
		this.queueName = queueName;
	}

	public static JedisSentinelQueueProducer create(String queueName) {
		return new JedisSentinelQueueProducer(queueName);
	}

	public boolean publish(Object message) {
		return JedisSentinelKit.lpush("queue-" + queueName, message) >= 1 ? true
				: false;
	}
}
